From: Stefano Stabellini Date: Tue, 5 Feb 2013 11:31:08 +0000 (+0000) Subject: xen/arm: implement arch_domain_destroy X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7318 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=3535ad04f2e3cef0306b59fff5ca70b217a45585;p=xen.git xen/arm: implement arch_domain_destroy Implement arch_domain_destroy, use it in the error path of arch_domain_create. Signed-off-by: Stefano Stabellini Acked-by: Ian Campbell Acked-by: Tim Deegan Committed-by: Ian Campbell --- diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 59d8d73be4..48dce80ed8 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -437,20 +437,17 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags) fail: d->is_dying = DOMDYING_dead; - free_xenheap_page(d->shared_info); - - p2m_teardown(d); - - domain_vgic_free(d); - domain_uart0_free(d); + arch_domain_destroy(d); return rc; } void arch_domain_destroy(struct domain *d) { - /* p2m_destroy */ - /* domain_vgic_destroy */ + p2m_teardown(d); + domain_vgic_free(d); + domain_uart0_free(d); + free_xenheap_page(d->shared_info); } static int is_guest_psr(uint32_t psr)